-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add ics filter params #2647
base: main
Are you sure you want to change the base?
add ics filter params #2647
Conversation
pending until hub-sdk pr checked in |
change/@microsoft-teams-js-dda2304f-2384-4778-83a4-caa10d929abf.json
Outdated
Show resolved
Hide resolved
…f.json Co-authored-by: Trevor Harris <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please validate that dialog sizes aren't too small. It will never be valid for a developer to pass up a size <= 0 for either height or width.
* @internal | ||
* Limited to Microsoft-internal use | ||
*/ | ||
export const errorInvalidDialogSize = 'Invalid store dialog size'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export const errorInvalidDialogSize = 'Invalid store dialog size'; | |
const errorInvalidDialogSize = 'Invalid store dialog size'; |
No need to export this. I'd actually like this to be moved into the function it's used in as well. Since we aren't using this string anywhere else there's no need to put it in the global namespace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was resolved but no change was made and no explanation was given as to why no change was made.
Co-authored-by: Trevor Harris <[email protected]>
…ibrary-js into users/hangyin/1204_ics
* The installation scope (e.g., "Personal" | "Team"). | ||
* Defaults to "Personal". | ||
*/ | ||
installationScope?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Things like appCapability, appMetaCapabilities, installationScope, and filteredOutAppIds should be more strongly typed than just strings and arrays of strings - just using strings here will make it very easy for consumers of this sdk to pass in invalid input - for example, what happens if they set installationScope
to "personal" or "personal " or "Person"? Generally, you want to make app developer facing things as strongly typed as possible so that you can help them eliminate those kind of invalid input errors. When you that, depending on how you do it you may need to make those types serializable so that they can be stringified and passed to the host successfully.
Off the top of my head, the parameters you are adding here fall into two buckets:
-
appCapability
,appMetaCapabilities
, andinstallationScope
should all be enums (likeStoreDialogType
above). This will make sure that your code in the host only receives values that it is expecting. Going this way means that introducing new values will require future changes to this code. -
filteredOutAppIds should use the
AppId
class, defined inappId.ts
. That file includes serialization and validation logic for AppIds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've added some new functionality to this since I last reviewed it, so left some updated requests around typing.
For more information about how to contribute to this repo, visit this page.
Description
re-add otherAppState and Store e2e tests & add store size interface & add ics filter params
Main changes in the PR:
Validation
Validation performed:
Unit Tests added:
No. No need for this change
End-to-end tests added:
Yes
Additional Requirements
Change file added:
Yes